package com.api;

import java.io.InputStream;
import java.util.Scanner;

public class ScannerDemo {

    public static void main(String[] args) {


//        创建键盘录入对象
        InputStream in = System.in;
        Scanner sc = new Scanner(in);


//        System.out.println("请输入数值:");
//        int i = sc.nextInt();
//
//        System.out.println("接收到键盘输入的:" + i);

        System.out.println("请输入字符串:");

//        String str = sc.next();

        String str = sc.nextLine();

        System.out.println("接收到键盘输入的:" + str);
    }
}
